package com.srwl.mytx.widget;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.srwl.mytx.R;

public class CommentFooter extends RelativeLayout {
    private ProgressBar progressBar;
    private TextView tv_loadingMsg;

    public CommentFooter(Context context) {
        super(context);
        View view = LayoutInflater.from(context).inflate(R.layout.comment_list_footer, this);
        progressBar = view.findViewById(R.id.progress_bar);
        tv_loadingMsg = view.findViewById(R.id.tv_loading_msg);
    }


    public void showNoMoreData() {
        progressBar.setVisibility(GONE);
        tv_loadingMsg.setVisibility(VISIBLE);
        if (!isShown()) {
            setVisibility(View.VISIBLE);
        }
    }
}
